<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<ui:define name="content">
   
		<h:form id="editForm">         
			<p:panel id="panel" header="Form" style="margin-bottom:10px;">
		       <p:messages id="messages" closable="true"><p:autoUpdate/></p:messages>
		        
		        <h:panelGrid columns="2" cellpadding="5">
					<p:outputLabel for="username" value="username" />				
					<p:inputText id="username" 
							  value="#{keycloakServiceTestBean.username}"/>
						   
					<p:outputLabel for="email" value="Email"></p:outputLabel>		
					<p:inputText id="email" 
							  value="#{keycloakServiceTestBean.email}" />
						   
					<p:outputLabel for="userExist" value="Is user exist"></p:outputLabel>		
					<h:outputText id="userExist" 
							  value="#{keycloakServiceTestBean.usernameExist}" />
						   
					<p:outputLabel for="emailExist" value="Is email exist"></p:outputLabel>		
					<h:outputText id="emailExist" 
							  value="#{keycloakServiceTestBean.emailExist}" />
				</h:panelGrid>
			</p:panel>
			
			<p:commandButton value="Submit" ajax="false" />
			<p:commandButton action="#{keycloakServiceTestBean.changePassword()}" value="testChangePassword"></p:commandButton>
		</h:form>
      
   	</ui:define>
</ui:composition>
